// TOWN DIALOGUE SCRIPT
//    Town 61: Guarded Tunnel

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode;
	tag = 1;
	state = -1;
	nextstate = -1;
	question = "";
	text1 = "This tunnel is full of smugglers and their guards. They are painfully determined to avoid talking to you.";
	text2 = "_The innkeeper will deal with you. Leave us alone._";

// Velasquez

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Velasquez";
	text1 = "The man behind the counter is very unfriendly. He's willing to talk to you, but he is unhappy that you were granted passage through the smuggler's tunnels.";
	text2 = "_You can call me Velasquez. State your business and get out._";
	text5 = "Velasquez frowns and remains silent.";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 5;
	question = "_What is this tunnel for?_";
	text1 = "_Getting you killed, if you tell anyone about it. This is the only route to get goods into and out of Valorim. Believe me, if it wasn't for the stuff we smuggle through, things to the south would be much worse._";
	text2 = "_You're lucky. We have to kill most people who stumble on us._";
	
begintalknode;
	state = 5;
	nextstate = -1;
	question = "_Why was I spared?_";
	text1 = "_We got word from Lorelei to let you in. Don't know what you did there. Probably bribed them._";


begintalknode;
	state = 1;
	nextstate = 4;
	question = "_Could I leave Valorim through the tunnel to the north?_";
	text1 = "_Others could. You can't._";

begintalknode;
	state = 4;
	nextstate = -1;
	question = "_Why not?_";
	text1 = "_Instructions. From who doesn't concern you. But your business is in Valorim._";


begintalknode;
	state = 1;
	nextstate = 2;
	question = "_What can I get here?_";
	text1 = "_You're very lucky. We were expecting you. Just follow the rules and everything will be happy. A room is 50 coins. A drink is 25. I also sell some 'Guild Supplies.'_";

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_Why did you say I am lucky?_";
	text1 = "_Word was sent ahead from Lorelei that you might be coming to get into Blackcrag, and that you should be allowed to pass. If we hadn't heard otherwise, you would be dead now._";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_What are the rules?_";
	text1 = "_Don't talk to people. Don't pick things up. Don't go where you aren't wanted. Go to Blackcrag, or leave._";

begintalknode;
	state = 3;
	nextstate = 2;
	question = "_Do you know anything about Blackcrag?_";
	text1 = "_The passage to Blackcrag is north of the inn. Before you go, there's a lever hidden in my office. Pull it once to clear the way through. Now go._";
	action = END_TALK;

begintalknode;
	state = 2;
	nextstate = -1;
	condition = coins_amount() >= 50;
	question = "_I'll take a room._ Pay 50 coins.";
	text1 = "All eyes in the room upon you, you are shown to a chilly, cramped room. You have an uneasy night's sleep.";
	action = END_TALK;	
	code =
		revive_party();
		change_coins(-50);
		relocate_char(get_pc_id(0),43,29,FALSE);
		relocate_char(get_pc_id(1),44,29,FALSE);
		relocate_char(get_pc_id(2),44,30,FALSE);
		relocate_char(get_pc_id(3),43,30,FALSE);
	break;

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_Let's trade._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Thieves Guild Supplies","A lot of the people who travel through this tunnel exist outside the law. Velasquez sells them things which help them live their criminal lifestyles.",117,5,3);
	break;

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_A round of drinks._ Pay 25 coins.";
	text1 = "You pay an excessive amount of money for bitter, oily whiskey that makes your eyes water. _Drink up, worm,_ Velasquez says.";
	text2 = "You try to make small talk with the other patrons. No luck.";
	code =
		force_char_status(30000,1,20);
		change_coins(-25);
	break;

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_I don't need anything else._";
	text1 = "_Time for you to move on, then._";
	action = END_TALK;